import { request } from '@/utils/http';

export const getProductClassify = (params?: any): any => {
  return request.post('/app/products/categories/tree', params);
};
export const productsByCateId = (params: any): any => {
  return request.get<any>('/app/products/productsByTop', params);
};
export const productsByCateIdLimit = (params: any): any => {
  return request.get<any>('/app/products/productsByTopLimit', params);
};
export const getProductDetail = (params: any): any => {
  return request.get<any>('/app/products/spu/detail', params);
};
export const getCoupons = (params: any): any => {
  return request.get<any>('/app/products/detail', params);
};
// 添加购物车
export const addCart = (data: any): any => {
  return request.post<any>('/app/shopping/add', data);
};
//首页最新5条单元
export const getProductHome = (params: any): any => {
  return request.get<any>('/app/products/spu/home', params);
};
